"""公司操作接口需要上传的参数
@Project: Rebar
@File: company_params.py
@Author: hzc
@Date: 2023/3/27 21:02
"""
from typing import Optional

from pydantic import BaseModel, Field


class CompanyInfoParam(BaseModel):  # 添加公司需要的参数
    company_name: str = Field(..., max_length=50, title="公司名称")
    company_code: str = Field(..., max_length=50, title="机构代码")
    company_representative: str = Field(..., max_length=10, title="法人代表")
    # auth_number = Field(..., max_length=20, title="授权序列号")
    # is_authorized:int =  Field(..., max_length=20, title="授权状态")
    # authorized_person = Field(..., max_length=10, title="授权人")
    remark: Optional[str] = Field(default="", title="备注")


class UpdateComParam(BaseModel):
    add: list = Field(title="添加公司", default=[{'company_name': '##', "company_code": '#', 'company_representative': '#','remark': '#'}])
    delete: list = Field(title="删除公司", default=[{"company_id": 1}])
    update: list = Field(title="修改公司",
                         default=[{"company_id": 1}])
